*Do file for House analysis and results in "On the Decline of Elite-Educated Republicans In Congress," Volden, Craig, Jonathan Wai, and Alan E. Wiseman. Published in Perspectives on Politics

*Use stata dataset: voldenwaiwiseman_house_perspectives_replication_final.dta

*In the analysis that follows, we have coded elite education as "1" if attended elite undergraduate, graduate, law school and/or business school

* Combining all here

gen elite_education=0
replace elite_education=1 if elite_undergrad_75==1
replace elite_education=1 if elite_grad_75==1
replace elite_education=1 if elite_law==1
replace elite_education=1 if elite_mba==1
label var elite_education "1 = graduated from elite institution"

* Likewise for ivy league schools:

gen ivyany=0
replace ivyany=1 if ivy_undergrad==1
replace ivyany=1 if ivy_grad==1
replace ivyany=1 if ivy_law==1
replace ivyany=1 if ivy_mba==1
label var ivyany "1 = graduated from Ivy League"

* Coding data for exploring regional codings
drop south
gen south=0
replace south=1 if st_name=="OK" | st_name=="TX" | st_name=="AR" | st_name=="LA" | st_name=="MS" | st_name=="AL" | st_name=="TN" | st_name=="KY" | st_name=="FL" | st_name=="GA" | st_name=="SC" | st_name=="NC" | st_name=="VA" | st_name=="WV" 
gen northeast=0
replace northeast=1 if st_name=="MD" | st_name=="DE" | st_name=="PA" | st_name=="NJ" | st_name=="NY" | st_name=="CT" | st_name=="RI" | st_name=="MA" | st_name=="NH" | st_name=="VT" | st_name=="ME" 
gen midwest=0
replace midwest=1 if st_name=="ND" | st_name=="SD" | st_name=="NE" | st_name=="KS" | st_name=="MN" | st_name=="IA" | st_name=="MO" | st_name=="WI" | st_name=="IL" | st_name=="IN" | st_name=="MI" | st_name=="OH" 
gen west=0
replace west=1 if st_name=="AK" | st_name=="HI" | st_name=="WA" | st_name=="OR" | st_name=="CA" | st_name=="MT" | st_name=="ID" | st_name=="WY" | st_name=="NV" | st_name=="UT" | st_name=="CO" | st_name=="AZ" | st_name=="NM" 

*****************************************
**** MODELS FOR FIGURES PRESENTED IN BODY OF PERSPECTIVES MANUSCRIPT ****
*****************************************
* FIGURE 1: DECLINE OF ELITE-EDUCATED REPUBLICANS IN CONGRESS (FOR HOUSE)
sort congress
tab congress elite_education if dem==0, r
tab congress elite_education if dem==1, r

* FIGURE 2: HARVARD GRADUATES IN THE HOUSE, BY PARTY

sort congress
by congress: sum harvard if dem==1
by congress: sum harvard if dem==0

* FIGURE 4: ELITE-EDUCATED LAWMAKERS ARE MORE LIBERAL (HOUSE MEMBERS)
regress dwnom1 elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq if dem==0, cluster(bioguide_id)
regress dwnom1 elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq if dem==1, cluster(bioguide_id)

* COMPARING MAGNITUDE OF EFFECTS
sum dwnom1 if dem==0
* Nearly a half of a standard deviation
* Also note that similar in size to gender effect

* FIGURE 5: ELITE-EDUCATED REPUBLICANS ARE NO MORE EFFECTIVE (HOUSE MEMBERS)
regress lesclassic elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power meddist female afam latino deleg_size votepct votepct_sq if dem==0, cluster(bioguide_id)
regress lesclassic elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power meddist female afam latino deleg_size votepct votepct_sq if dem==1, cluster(bioguide_id)


* FOR APPENDIX TABLES

* A1: VARIABLE DESCRIPTIONS, SOURCES, AND SUMMARY STATISTICS
sum elite_education ivyany dwnom1 lesclassic majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power meddist female afam latino deleg_size votepct

* A2: IDEOLOGY AND ELITE-EDUCATED LAWMAKERS (HOUSE)
* Model A2.1
regress dwnom1 elite_education if dem==0, cluster(bioguide_id)
* Model A2.2
regress dwnom1 elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq if dem==0, cluster(bioguide_id)
* Model A2.3 add versions with Congress fixed effects.  Republicans:
regress dwnom1 elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq i.congress if dem==0, cluster(bioguide_id)
* Model A2.4
regress dwnom1 elite_education if dem==1, cluster(bioguide_id)
* Model A2.5
regress dwnom1 elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq if dem==1, cluster(bioguide_id)
* Model A2.6
regress dwnom1 elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq i.congress if dem==1, cluster(bioguide_id)

* A4: ROBUSTNESS OF IDEOLOGY AND ELITE-EDUCATED LAWMAKERS (HOUSE)
gener elite_undergrad_university=0
replace elite_undergrad_university= 1 if elite_undergrad_75==1 & elite_las_college==0

gener elite_no_las = 0
replace elite_no_las = 1 if elite_education==1 & elite_las_college==0

gener elite_education_total = elite_undergrad_75+elite_grad_75+elite_law+elite_mba

*replicate analyses in Table A2 for different elite education variables

*control only for if someone went to an elite undergraduate university (not including LAC)

regress dwnom1 elite_undergrad_university majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq if dem==0, cluster(bioguide_id)
regress dwnom1 elite_undergrad_university majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq if dem==1, cluster(bioguide_id)

*control only for if someone went to an elite institution--graduate, professional, or undergraduate--other than an elite LAC

regress dwnom1 elite_no_las majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq if dem==0, cluster(bioguide_id)
regress dwnom1 elite_no_las majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq if dem==1, cluster(bioguide_id)

*control for total number of elite educational experiences (undergraduate plus law/business/graduate--maximum value is three)

regress dwnom1 elite_education_total majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq if dem==0, cluster(bioguide_id)
regress dwnom1 elite_education_total majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq if dem==1, cluster(bioguide_id)

* A5: ROBUSTNESS OF LIBERAL ELITE-EDUCATED LAWMAKERS RESULTS (HOUSE)
* Model A5.1 Republicans (midwest as control region)
regress dwnom1 elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq south northeast west if dem==0, cluster(bioguide_id)
* Model A5.2 Remove the South.  Republicans:
regress dwnom1 elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq if dem==0 & south==0, cluster(bioguide_id)
* Model A5.3 Democrats with regional controls
regress dwnom1 elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq south northeast west if dem==1, cluster(bioguide_id)
* Model A5.4 Democrats excluding South
regress dwnom1 elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq if dem==1 & south==0, cluster(bioguide_id)

* A7: ROBUSTNESS OF IDEOLOGY RESULTS TO IVY LEAGUE-EDUCATED LAWMAKERS (HOUSE)
* Model A7.1
regress dwnom1 ivyany if dem==0, cluster(bioguide_id)
* Model A7.2
regress dwnom1 ivyany majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq if dem==0, cluster(bioguide_id)
* Model A7.3 (Congress fixed effects)
regress dwnom1 ivyany majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq i.congress if dem==0, cluster(bioguide_id)
* Model A7.4
regress dwnom1 ivyany if dem==1, cluster(bioguide_id)
* Model A7.5
regress dwnom1 ivyany majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq if dem==1, cluster(bioguide_id)
* Model A7.6
regress dwnom1 ivyany majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power female afam latino deleg_size votepct votepct_sq i.congress if dem==1, cluster(bioguide_id)

* A9: LAWMAKING EFFECTIVENESS OF ELITE-EDUCATED LEGISLATORS (HOUSE) 
* Model A9.1
regress lesclassic elite_education if dem==0, cluster(bioguide_id)
* Model A9.2
regress lesclassic elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power meddist female afam latino deleg_size votepct votepct_sq if dem==0, cluster(bioguide_id)
* Model A9.3  Congress fixed effects
regress lesclassic elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power meddist female afam latino deleg_size votepct votepct_sq i.congress if dem==0, cluster(bioguide_id)
* Model A9.4
regress lesclassic elite_education if dem==1, cluster(bioguide_id)
* Model A9.5
regress lesclassic elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power meddist female afam latino deleg_size votepct votepct_sq if dem==1, cluster(bioguide_id)
* Model A9.6
regress lesclassic elite_education majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power meddist female afam latino deleg_size votepct votepct_sq i.congress if dem==1, cluster(bioguide_id)

* A11: ROBUSTNESS OF EFFECTIVENESS RESULTS TO IVY LEAGE-EDUCATED LAWMAKERS (HOUSE)
* Model A11.1
regress lesclassic ivyany if dem==0, cluster(bioguide_id)
* Model A11.2
regress lesclassic ivyany majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power meddist female afam latino deleg_size votepct votepct_sq if dem==0, cluster(bioguide_id)
* Model A11.3  
regress lesclassic ivyany majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power meddist female afam latino deleg_size votepct votepct_sq i.congress if dem==0, cluster(bioguide_id)
* Model A11.4
regress lesclassic ivyany if dem==1, cluster(bioguide_id)
* Model A11.5
regress lesclassic ivyany majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power meddist female afam latino deleg_size votepct votepct_sq if dem==1, cluster(bioguide_id)
* Model A11.6
regress lesclassic ivyany majority seniority sensq state_leg state_leg_prof maj_leader min_leader speaker chair subchr power meddist female afam latino deleg_size votepct votepct_sq i.congress if dem==1, cluster(bioguide_id)

* A12 will be LES Senate Ivys

* A13: ELITE EDUCATION AND VOTE SHARE (HOUSE)

gen congcount=congress-93
label var congcount "Congress counter with 93rd Congress set to 0"
* Model A13.1
reg votepct elite_education if dem==0
* Model A13.2
reg votepct i.elite_education##c.congcount if dem==0
* Reelection vote shares no different, and no change over time
* And for Democrats:
* Model A13.3
reg votepct elite_education if dem==1
* Model A13.4
reg votepct i.elite_education##c.congcount if dem==1

* FIGURE A1: DECLINE OF ELITE-EDUCATED REPUBLICANS IN THE HOUSE

gener nonelite_nonflagship=0
replace nonelite_nonflagship = 1 if elite_education==0 & flagship_undergrad==0

gener nonelite_flagship = 0
replace nonelite_flagship=1 if flagship_undergrad==1 & elite_education==0

sort congress
tab congress elite_education if dem==0, r
tab congress nonelite_nonflagship if dem==0, r
tab congress nonelite_flagship if dem==0, r


